#include "ActionGameInfoListen.h"
#include "gameinfomgr.h"
#include "log.h"


void ActionGameInfoListen::OnGameInfoUpdate(const topic_proto::Topic& topic)
{
    log_debug("enter");
    gameinfo_proto::GameInfo gameinfo;
    if (!gameinfo.ParseFromArray(topic.data().data(), topic.data().size()))
    {
        log_error("data parser agency_proto::Agency failed, %s", topic.ShortDebugString().c_str());
        return;
    }
    log_info("gameinfo:%s", gameinfo.ShortDebugString().c_str());
    stGameInfo st_gameinfo;
    st_gameinfo.CopyFrom(gameinfo);
    GameInfoMgr::Instance()->Update(std::move(st_gameinfo));
}
















